package com.ztjy.statis.biz.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.ztjy.bean.CustomStatis;
import com.ztjy.bean.RkStatis;
import com.ztjy.statis.biz.CustomStatisBiz;
import com.ztjy.statis.dao.CustomStatisDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CustomStatisBizImpl implements CustomStatisBiz {
    @Autowired
    private CustomStatisDao customdao;

    @Override
    public PageInfo<CustomStatis> findAllCustomStatis(CustomStatis customStatis, Integer pageNo, Integer pageSize) {
        PageHelper.startPage(pageNo,pageSize);
        List<CustomStatis> allCustomStatis = customdao.findAllCustomStatis(customStatis);
        PageInfo<CustomStatis> pageInfo=new PageInfo<CustomStatis>(allCustomStatis);
        return pageInfo;
    }

    @Override
    public PageInfo<CustomStatis> findCustomStatisById(Integer id, Integer pageNo, Integer pageSize) {
        PageHelper.startPage(pageNo,pageSize);
        List<CustomStatis> customstatisById = customdao.findCustomstatisById(id);
        PageInfo<CustomStatis> pageInfo=new PageInfo<CustomStatis>(customstatisById);
        return pageInfo;
    }

    @Override
    public List<CustomStatis> findbingZhuangtu() {
        return customdao.findbingZhuangtu();
    }
}
